import 'package:flutter/material.dart';

class MyApp11 extends StatelessWidget {
  const MyApp11({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('堆叠组件Stack'),
        backgroundColor: Colors.lightGreen,
        centerTitle: true,
      ),
      body: Center(
        child: Stack(
          // 超出---不裁剪
          clipBehavior: Clip.none,
          alignment: AlignmentDirectional.center,
          children: [
            Container(width: 200, height: 200, color: Colors.cyan),
            Positioned(child: Image.asset('open_eyes.png'), top: -100),
            Icon(Icons.android, size: 100, color: Colors.green),
          ],
        ),
      ),
    );
  }
}
